<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title></title>
        <script src="../vue.js" type="text/javascript" charset="utf-8"></script>
        <!-- <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> -->
    </head>
    <body>
        <div id="app" v-once>
            {{ msg }}
            <P>Using mustaches: {{ rawHtml }}</P>
            <P v-html="rawHtml"></P>
            <div v-bind:class="color">test...</div>
            <P>{{ number + 1 }}</P>
            <P>{{ ok ? 'YES' : 'NO' }}</P>
            <p>{{ message.split('').reverse().join('') }}</p>
        </div>
        <script type="text/javascript">
            var app = new Vue({
                el: '#app',
                data: {
                    msg: 'hi Vue',
                    rawHtml: '<span style="color:red">this is should be red</span>',
                    color: 'blue',
                    number: 10,
                    ok: true,
                    message: 'vue'
                }
            })

            // 加入v-once后msg不会变化
            app.msg = "change ...... ";
        </script>
        <style type="text/css">
            .red{color:red;}
            .blue{color:blue; font-size: 100px;}
        </style>
    </body>
</html>